package com.sunelec.service.Imp;

import com.sunelec.mapper.InverterMapper;
import com.sunelec.mapper.PowerMapper;
import com.sunelec.pojo.Inverter;
import com.sunelec.pojo.Power;
import com.sunelec.service.ComparePowerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 郑明利
 * @Description:
 * @Date: Create in 18:40 2018/05/21
 * @Modified By:
 */
@Service
public class ComparePowerServiceImpl implements ComparePowerService {

    @Autowired
    private PowerMapper powerMapper;

    @Autowired
    private InverterMapper inverterMapper;

    @Override
    public Power selectByPrimaryKey(String powerId) {
        return powerMapper.selectByPrimaryKey(powerId);
    }

    @Override
    public Float selectAllElec(String powerSN) {
        return inverterMapper.selectAllElec(powerSN);
    }

    @Override
    public Float selectDailyElec(String powerSN, String month_date) {
        return inverterMapper.selectDailyElec(powerSN,month_date);
    }

    @Override
    public List<Inverter> selectCurrentPowers(String collectorSn) {
        return inverterMapper.selectCurrentPowers(collectorSn);
    }
}
